﻿<!DOCTYPE html>
<html lang="en-us">

<head>
  <title>Online CRC-8 CRC-16 CRC-32 Calculator</title>
  <meta charset="UTF-8" />
  <meta name="description" content="Calculate CRC-8, CRC-16, CRC-32 checksums online" />
  <meta name="keywords"
    content="Cyclic redundancy check, CRC-8, CRC-16, CRC-32, Online CRC Calculator, CRC-8, CRC-8/CDMA2000, CRC-8/DARC, CRC-8/DVB-S2, CRC-8/EBU, CRC-8/I-CODE, CRC-8/ITU, CRC-8/MAXIM, CRC-8/ROHC, CRC-8/WCDMA, CRC-16/CCITT-FALSE, CRC-16/ARC, CRC-16/AUG-CCITT, CRC-16/BUYPASS, CRC-16/CDMA2000, CRC-16/DDS-110, CRC-16/DECT-R, CRC-16/DECT-X, CRC-16/DNP, CRC-16/EN-13757, CRC-16/GENIBUS, CRC-16/MAXIM, CRC-16/MCRF4XX, CRC-16/RIELLO, CRC-16/T10-DIF, CRC-16/TELEDISK, CRC-16/TMS37157, CRC-16/USB, CRC-A, CRC-16/KERMIT, CRC-16/MODBUS, CRC-16/X-25, CRC-16/XMODEM, CRC-32, CRC-32/BZIP2, CRC-32C, CRC-32D, CRC-32/MPEG-2, CRC-32/POSIX, CRC-32Q, CRC-32/JAMCRC, CRC-32/XFER, ASCII Converter" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <link rel="shortcut icon" href="favicon.ico" />

  <link rel="apple-touch-icon" href="touch-icon-iphone.png" />
  <link rel="apple-touch-icon" sizes="76x76" href="touch-icon-ipad.png" />
  <link rel="apple-touch-icon" sizes="120x120" href="touch-icon-iphone-retina.png" />
  <link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad-retina.png" />

  <link rel="stylesheet" href="css/bootstrap.min.css" />
  <link rel="stylesheet" href="css/cookieconsent.min.css" />

  <script src="js/2024.04.25.index.js"></script>
  <script src="js/cookieconsent.min.js"></script>

  <style>
    @media only screen and (max-width: 450px) {
      .notMobile {
        display: none;
      }
    }

    .center {
      margin: auto;
      width: 60%;
      border: 3px solid #73ad21;
      padding: 10px;
      align: center;
      text-aling: center;
    }

    #result {
      font-weight: bold;
    }
  </style>
  <script>
    function getQueryString(name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
      var r = window.location.search.substr(1).match(reg);
      if (r != null) return unescape(r[2]);
      return null;
    }
    window.addEventListener("load", function () {
      var paramValue = getQueryString("paramName");
      console.log("paramValue=" + paramValue);
      if (paramValue == null || paramValue.trim() === "") paramValue = "2333";
      document.getElementById("textAreaInputData").innerText = paramValue;
      document.getElementById("methodh").click();
      document.getElementById("btnCrc16").click();
      document.getElementById("btnCrc8").style.display = "none";
      document.getElementById("btnCrc16").style.display = "none";
      document.getElementById("btnCrc32").style.display = "none";
      document.getElementById("paramsControls").style.display = "none";
      const tdElements = document.querySelectorAll("td");
      tdElements.forEach((td) => {
        const divElement = td.querySelector("div");
        if (divElement) {
          divElement.onclick = (e) => {
            console.log(e);
          };
        }
      });
    });
  </script>
</head>

<body style="background: #efefef">
  <div style="margin-top: 2em; margin-left: 1em; margin-right: 1em" align="center">
    <div style="align-content: center; width: 850px; max-width: 100%">
      <div name="myform" id="myform" style="margin-bottom: 10px">
        <textarea cols="45" class="form-control" id="textAreaInputData" readonly style="
              max-height: 36px;
              resize: vertical;
              font-family: monospace;
              resize: none;
            ">
123456789</textarea>

        <div id="paramsControls" style="margin: 15px; display: none">
          <div style="display: inline-block">
            <b>Input:</b>
            <label class="radio-inline" for="methoda">
              <input type="radio" value="ascii" id="methoda" name="method" onclick="getcrc();" checked="" />ASCII
            </label>
            <label class="radio-inline" for="methodh">
              <input type="radio" value="hex" id="methodh" name="method" onclick="getcrc();" />HEX
            </label>
          </div>

          <div style="width: 15px; display: inline-block" class="notMobile"></div>

          <div style="display: inline-block">
            <label>Output:</label>
            <div style="display: inline-block">
              <label class="radio-inline" for="outTypeh">
                <input type="radio" value="hex" id="outTypeh" name="outtype" onclick="getcrc();" checked="" />HEX
              </label>
              <label class="radio-inline" for="outTyped">
                <input type="radio" value="dec" id="outTyped" name="outtype" onclick="getcrc();
                                        " />DEC
              </label>
              <label class="radio-inline" for="outTypeo">
                <input type="radio" value="oct" id="outTypeo" name="outtype" onclick="getcrc();" />OCT
              </label>
              <label class="radio-inline notMobile" for="outTypeb">
                <input type="radio" value="bin" id="outTypeb" name="outtype" onclick="getcrc();
                                        " />BIN
              </label>
            </div>
          </div>

          <div style="width: 15px; display: inline-block" class="notMobile"></div>

          <label class="checkbox-inline" style="margin-bottom: 0px; vertical-align: middle; display: none">
            <input type="checkbox" id="chkbxShowHex" onclick="getcrc();" />Show processed data (HEX)
          </label>
        </div>

        <button id="btnCrc8" class="btn btn-default" style="display: none" onclick="getcrc('crc8');">
          CRC-8
        </button>
        <button id="btnCrc16" class="btn btn-default" style="display: none" onclick="getcrc('crc16');">
          CRC-16
        </button>
        <button id="btnCrc32" class="btn btn-default" style="display: none" onclick=" getcrc('crc32');">
          CRC-32
        </button>
        <button id="btnCrc64" class="btn btn-default" style="display: none" onclick=" getcrc('crc64');">
          CRC-64
        </button>

        <button id="btnBackToList" class="btn btn-default" style="display: none" onclick="getcrc('crc8');">
          Back to all algos
        </button>
        <button id="btnCrcCustom" class="btn btn-default" style="display: none" onclick="getcrc(customAlgoName);">
          Select ALGO from list
        </button>
      </div>

      <div class="panel panel-default" style="display: none; text-align: left" id="sourceData">
        <div class="panel-heading">Processed data</div>
        <div class="panel-body" id="lblDataHex" style="font-family: monospace"></div>
      </div>

      <p>
        <script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <ins class="adsbygoogle" style="display: none; width: 728px; height: 90px"
          data-ad-client="ca-pub-3210294270109310" data-ad-slot="3394305716"></ins>
        <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
      </p>

      <table id="crcTable" class="table table-hover" style="font-family: monospace">
        <tr>
          <td>Algorithm</td>
          <td bgcolor="#dddddd">Result</td>
          <td>Check</td>
          <td class="notMobile">Poly</td>
          <td class="notMobile">Init</td>
          <td class="notMobile">RefIn</td>
          <td class="notMobile">RefOut</td>
          <td class="notMobile">XorOut</td>
        </tr>
      </table>

      <table style="visibility: hidden">
        <tr id="template">
          <td id="name"></td>
          <td bgcolor="#cccccc" id="result"></td>
          <td id="check"></td>
          <td class="notMobile" id="poly"></td>
          <td class="notMobile" id="init"></td>
          <td class="notMobile" id="refIn"></td>
          <td class="notMobile" id="refOut"></td>
          <td class="notMobile" id="xorOut"></td>
        </tr>
      </table>

      <div id="enableJsNotification" style="font-family: monospace">
        <p>
          Please enable JavaScript on this site or click one of the buttons
          above.
        </p>
      </div>
      <div class="panel panel-default" style="display: none; text-align: left" id="crcLookupTable">
        <div class="panel-heading">CRC lookup table</div>
        <div class="panel-body" id="lblCrcLookupTable" style="font-family: monospace"></div>
      </div>

      <p style="display: none">
        Share your result:<br />
        <input type="text" readonly="" id="shareurl" onclick="this.setSelectionRange(0, this.value.length)"
          class="form-control" style="background-color: #fff" />
      </p>

      <script>
        getcrc("crc8");
      </script>

      <div id="con"></div>

      <p style="display: none">
        <a href="bytestuffing.php.html">Consistent Overhead Byte Stuffing (COBS) Encoder/Decoder</a><br />
        <a href="privacy.php.html">Cookies policies</a>
      </p>
    </div>
  </div>
  <script>
    (function (i, s, o, g, r, a, m) {
      i["GoogleAnalyticsObject"] = r;
      (i[r] =
        i[r] ||
        function () {
          (i[r].q = i[r].q || []).push(arguments);
        }),
      (i[r].l = 1 * new Date());
      (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
      a.async = 1;
      a.src = g;
      m.parentNode.insertBefore(a, m);
    })(
      window,
      document,
      "script",
      "https://www.google-analytics.com/analytics.js",
      "ga"
    );

    ga("create", "UA-76733529-1", "auto");
    ga("send", "pageview");
  </script>
</body>

</html>